feat: centralize organization label policy#5
Merged
Conversation
Member
Author
自动验证结果本 PR 的 GitHub Actions 已全部通过:
只读 Preview 使用 |
lzm0x219
marked this pull request as ready for review
July 11, 2026 06:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更摘要
新增独立的
label-policy.yml,将组织级标签的所有权边界、历史受管名称和仓库同步范围从 Ruby 实现中提取为可审查配置,并将同步范围改为显式仓库 Allowlist。主要修改
.github/label-policy.yml:.github、ecosystem、epheon、matharts、skills、ziwei。labels.yml的每个正式标签必须属于策略的受管前缀或精确名称;aliases必须同时登记在legacy_names;职责边界
.github/labels.yml:目标标签的名称、颜色、描述,以及当前需要执行的一对一迁移别名;.github/label-policy.yml:组织拥有的标签范围、仍需清理的历史名称、仓库 Allowlist;docs/label-governance.md:标签使用语义、流程和维护责任。这避免把当前实现常量当成标准来源,也避免新增仓库未经审查就自动获得组织级写操作。
行为变化
repository手动参数只能选择 Allowlist 中的仓库;labels.yml的aliases移除迁移映射后,只要名称仍在legacy_names,同步器仍会清理遗留旧标签;验证
main提交014a321,无落后提交;风险与约束
repositories.include;legacy_names前,必须确认所有 Allowlist 仓库已完成旧标签清理;审查重点
aliases与legacy_names的生命周期划分是否清晰;